Imports Aricie.DNN.Caching

Namespace Aricie.DNN.Caching.Analysis
    Public Structure TargetJob

        Public Sub New(ByVal strategyType As StrategyType, ByVal distriType As CacheDistributionType)
            Me.StrategyType = strategyType
            'Me.TargetJobNature = autoNature
            Me.DistributionType = distriType
            Me.Tags = ""
        End Sub

        Public Sub New(ByVal strategyType As StrategyType, ByVal distriType As CacheDistributionType, ByVal tags As String)
            Me.New(strategyType, distriType)
            Me.Tags = tags
        End Sub

        Public Sub New(ByVal originalTarget As TargetJob, ByVal tags As String)
            'Me.New(originalTarget.StrategyType, originalTarget.TargetJobNature, originalTarget.DistributionType, originalTarget.Tags)
            Me.New(originalTarget.StrategyType, originalTarget.DistributionType, originalTarget.Tags)
            If Me.Tags <> "" Then
                Me.Tags &= ","c
            End If
            Me.Tags &= tags
        End Sub

        Public Sub New(ByVal originalTarget As TargetJob, ByVal distriType As CacheDistributionType)
            'Me.New(originalTarget.StrategyType, originalTarget.TargetJobNature, originalTarget.DistributionType, originalTarget.Tags)
            Me.New(originalTarget.StrategyType, distriType, originalTarget.Tags)
        End Sub



        Public StrategyType As StrategyType
        'Public TargetJobNature As TargetJobNature
        Public DistributionType As CacheDistributionType
        Public Tags As String

        'Public Shared InvalidJob As New TargetJob(StrategyType.Group, TargetJobNature.Invalid, CacheDistributionType.Undefined)
        Public Shared InvalidJob As New TargetJob(StrategyType.Key, CacheDistributionType.Undefined)

    End Structure
End Namespace